package com.jf.net;

import android.util.Pair;

import java.util.List;

import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.X509TrustManager;

import okhttp3.Interceptor;
import retrofit2.CallAdapter;

/**
 * @Discribe: com.android.faw.vw.sehandler.event.net.creator
 * @Time: 2023/2/20
 * @Author: Yinhao
 */
public interface IServiceInterceptor {

    <T> ITokenInterceptor getTokenInterceptor(Class<T> tClass, ITokenInterceptor defaultToken);

    <T> T createService(String baseUrl, ITokenInterceptor tokenInterceptor, Class<T> tClass);

    <T> T createService(String baseUrl, ITokenInterceptor tokenInterceptor, Class<T> tClass, List<CallAdapter.Factory> adapters);

    <T> T createHttpService(String baseUrl, ITokenInterceptor tokenInterceptor, Class<T> tClass, List<CallAdapter.Factory> adapters);

    <T> T createService(String baseUrl, List<Interceptor> interceptors, Class<T> tClass);

    Pair<SSLSocketFactory, X509TrustManager>  provideSSLSocketManager();
}
